<div class="x-body">
            <form class="layui-form" method="post" action="{:U('admin/goods/addsku')}">

            <div class="layui-form-item">
            <label class="layui-form-label">属性选择</label>
                <?php foreach ($attrs as $k => $attr) { ?>
                    
                    <div class="layui-input-inline">
                      <select name="attr[]">
                        <?php foreach ($attr as  $row) { ?>
                            <option value="<?php echo $row['good_attr_id'] ?>" ><?php echo $row['good_attr_value'] ?></option>
                        <?php } ?>
                      </select>
                    </div>
                <?php } ?>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">价格</label>
                <div class="layui-input-inline">
                    <input type="tel" name="good_price" lay-verify="phone" autocomplete="off" class="layui-input">
                </div>
                <label class="layui-form-label">库存</label>
                <div class="layui-input-inline">
                    <input type="tel" name="good_stock" lay-verify="phone" autocomplete="off" class="layui-input">
                </div>
            </div>
                <div class="layui-form-item">
                    <input type="hidden" value="<?php echo $_GET['id'] ?>" name="good_id">
                    <label for="L_repass" class="layui-form-label">
                    </label>
                    <input type="submit"  class="layui-btn" value="增加">
                </div>
            </form>
            <table class="layui-table">
                <thead>
                    <tr>
                        <th>
                            <input id="all" type="checkbox" name="" value="">
                        </th>
                        <th>
                            sku
                        </th>
                        <th>
                            名称
                        </th>
                        <th>
                            库存
                        </th>
                         <th>
                            价格
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($list as $row) { ?>          
                        <tr>
                            <td>
                                <input class="son" type="checkbox" value="<?php echo $good['id'] ?>" name="">
                            </td>
                            <td>
                                <?php echo $row['good_listid'] ?>
                            </td>
                            <td >
                                <?php echo $row['good_attr_value'] ?>
                            </td>
                            <td >
                                <?php echo $row['good_stock'] ?>
                            </td>
                            <td >
                                <?php echo $row['good_price'] ?>
                            </td>=
                            <td class="td-manage">
                                
                                
                                <a title="管理属性" href="{:U('admin/goods/addattr',array('id'=>$good['good_id']))}"
                                class="ml-5" style="text-decoration:none">
                                    <i class="layui-icon">&#xe642;</i>
                                </a>

                                <a title="管理sku" href="{:U('admin/goods/addsku',array('id'=>$good['good_id']))}"
                                class="ml-5" style="text-decoration:none">
                                    <i class="layui-icon">&#xe642;</i>
                                </a>
                               
                            </td>
                        </tr>
                    <?php } ?>
                </tbody>
            </table>
        </div>
        <script src="./lib/layui/layui.js" charset="utf-8">
        </script>
        <script src="./js/x-layui.js" charset="utf-8">
        </script>
        <script>
            layui.use(['form','layer'], function(){
                $ = layui.jquery;
              var form = layui.form()
              ,layer = layui.layer;
              
            });
        </script>